home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DDJMAG
/
DDJ9203.ZIP
/
OOPASM.ZIP
/
SCREEN.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-07-13
|
3KB
|
122 lines
.MODEL SMALL
INCLUDE equates.inc
INCLUDE instance.inc
INCLUDE messages.inc
INCLUDE objects.inc
IF1
INCLUDE macros.mac
INCLUDE objects.mac
INCLUDE video.mac
ENDIF
EXTRN Clock:WORD
EXTRN DlgMenu:WORD
EXTRN Dir:WORD
EXTRN DosError:WORD
EXTRN FileDlg:WORD
EXTRN FileInfo:WORD
EXTRN Help:WORD
EXTRN MenuBar:WORD
EXTRN Keyboard:WORD
EXTRN Self:WORD
EXTRN SBorder:WORD
EXTRN System:WORD
EXTRN VertMenu0:WORD
EXTRN VertMenu1:WORD
EXTRN VertMenu2:WORD
EXTRN VertMenu3:WORD
EXTRN Window:WORD
.CODE
COMMENT %
==============================================================================
Changes color objects color to monochrome values.
=============================================================================%
?ChangeColor PROC NEAR
mov ax,es ;Get video mem addr
eq ax,ColorAddr,?cc1 ;Exit if color
call resetColor ;Else - Reset color values
?cc1: ret
?ChangeColor ENDP
COMMENT %
==============================================================================
Sets the Color instance var to monochrome value for objects with color.
=============================================================================%
resetColor PROC NEAR
setInst Color,70h,Clock,1
setInst Color,70h,FileDlg,1
setInst Color,70h,FileInfo,1
setInst Color,70h,System,1
setInst Color,70h,DlgMenu,1
setInst Color,70h,Dir,1
setInst Color,70h,DosError,1
setInst Color,70h,Keyboard,1
setInst Color,70h,MenuBar,1
setInst Color,70h,Help,1
setInst Color,70h,VertMenu0,1
setInst Color,70h,VertMenu1,1
setInst Color,70h,VertMenu2,1
setInst Color,70h,VertMenu3,1
setInst Color,70h,Screen,1
ret
resetColor ENDP
COMMENT %
==============================================================================
Sets the video mode.
=============================================================================%
setVideoState PROC NEAR
setVideoMode 0,3 ;Display page 0, Mode 3
ret
setVideoState ENDP
IF Dbug
PUBLIC colorBorder
ENDIF
COMMENT %
==============================================================================
Changes the border color.
=============================================================================%
colorBorder PROC NEAR
getInst bl,Color,Screen ;Get screen color
setBorderColor bl
ret
colorBorder ENDP
.DATA
defMsg Screen,\
Init,\
<?ChangeColor,setVideoState,colorBorder>
defObj Screen,\
<Window,SBorder>,\
<Row1,1,1,\
Col1,1,0,\
Row2,1,24d,\
Col2,1,69d,\
Color,1,34h>,\
<Refresh,Init>
END